package homework.homework03;

public class Test03 {
    public static void main(String[] args) {
        //有参构造生成程序员对象
        Coder c1 = new Coder("张三","135",10000);
        //无参构造生成程序员对象
        Coder c2 = new Coder();
        //调用set方法为无参生成的程序员对象赋值
        c2.setName("李四");
        c2.setId("136");
        c2.setSal(10000);
        //有参构造生成项目经理对象
        Manager m1 = new Manager("王五","123",15000,6000);
        //无参生成项目经理对象
        Manager m2 = new Manager();
        //调用set方法为无参生成的项目经理对象赋值
        m2.setName("赵六");
        m2.setId("124");
        m2.setSal(15000);
        m2.setBonus(6000);
        //测试调用工作方法
        c1.work();
        c2.work();
        m1.work();
        m2.work();
    }
}
